package it.jx.wormholes;

import javax.swing.*;
import it.jx.wormholes.physics.*;
import it.jx.wormholes.ui.*;

public class Test {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		World w = new World(360, 10);
		Mass earth = new Mass(0, 0, 0, 5.9742e24);
		Mass moon = new Mass(new Point3D(370e6, 0, 0), new Point3D(0, 1022, 0), 7.347e22);
		w.addMass(earth);
		w.addMass(moon);
		w.addExternalForce(new Gravitation(w));
		
		JFrame test = new JFrame("Prova");
		WorldView vw = new WorldView(400, 400, 100/370e6, 60);
		vw.addMass(earth);
		vw.addMass(moon);
		test.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		test.setContentPane(vw);
		test.pack();
		test.setVisible(true);
		
		w.startSimulation();
		vw.startView();
		
	}

}
